#include "mystdio.h"

int main(){
	int cnt = 10;
	while(cnt--){
		MYFILE* ff = MYFopen("./log.txt", "a");
		if(ff == NULL){
			perror("open fail");
			exit(1);
		}

		char* msg = "write into log.txt\n";
		if(MYFwrite(ff, msg, strlen(msg)))
			printf("write error");
		
		MYFclose(ff);
	}

	return 0;
}
